package com.syh.jn.scm.infrastructure.repository.model.finance.archive;

import com.syh.core.ddd.infrastructure.repository.model.SuperBusinessModel;
import com.syh.core.ddd.infrastructure.repository.model.SuperModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * Created by soci.song on 2019/3/1.
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Entity
@EqualsAndHashCode(callSuper = true)
@Table(name = "T_FINANCE_ARCHIVE_SETTLEMENTS")
public class ArchiveSettlementsModel extends SuperModel {
    /**
     * 主表id
     */
    @Column(name = "ARCHIVE_ID", columnDefinition = "bigint COMMENT '主表id'")
    private Long archiveId;
    /**
     * 客户id
     */
    @Column(name = "CUSTOMER_ID", columnDefinition = "bigint COMMENT '客户id'")
    private Long customerId;
    /**
     * 客户类型: 0上游, 1下游, 2物流
     */
    @Column(name = "CUSTOMER_TYPE", columnDefinition = "smallint COMMENT '客户类型: 0上游, 1下游, 2物流'")
    private Short customerType;
    /**
     * 期初应收付金额
     */
    @Column(name = "BEGINNING_SHOULD_SETTLEMENTS", columnDefinition = "decimal(19,2) COMMENT '期初应收付金额'")
    private BigDecimal beginningShouldSettlements;
    /**
     * 期初已收付金额
     */
    @Column(name = "BEGINNING_ALREADY_SETTLEMENTS", columnDefinition = "decimal(19,2) COMMENT '期初已收付金额'")
    private BigDecimal beginningAlreadySettlements;
    /**
     * 总应收付金额
     */
    @Column(name = "TOTAL_SHOULD_SETTLEMENTS", columnDefinition = "decimal(19,2) COMMENT '总应收付金额'")
    private BigDecimal totalShouldSettlements;
    /**
     * 总已收付金额
     */
    @Column(name = "TOTAL_ALREADY_SETTLEMENTS", columnDefinition = "decimal(19,2) COMMENT '总已收付金额'")
    private BigDecimal totalAlreadySettlements;
    /**
     * 结存区间应收付金额
     */
    @Column(name = "RECORD_SHOULD_SETTLEMENTS", columnDefinition = "decimal(19,2) COMMENT '结存区间应收付金额'")
    private BigDecimal recordShouldSettlements;
    /**
     * 结存区间已收付金额
     */
    @Column(name = "RECORD_ALREADY_SETTLEMENTS", columnDefinition = "decimal(19,2) COMMENT '结存区间已收付金额'")
    private BigDecimal recordAlreadySettlements;

    /**
     * 采购订单金额
     */
    @Column(name = "PURCHASE_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '采购订单金额'")
    private BigDecimal purchaseAmount;
    /**
     * 采购订单优惠金额
     */
    @Column(name = "PURCHASE_DISCOUNT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '采购退货订单优惠金额'")
    private BigDecimal purchaseDiscountAmount;
    /**
     * 采购订单其他费用
     */
    @Column(name = "PURCHASE_OTHER_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '采购订单其他费用'")
    private BigDecimal purchaseOtherAmount;
    /**
     * 采购退货订单金额
     */
    @Column(name = "PURCHASE_RETURN_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '采购退货订单金额'")
    private BigDecimal purchaseReturnAmount;
    /**
     * 采购退货订单物流金额
     */
    @Column(name = "PURCHASE_RETURN_LOGISTICS_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '采购退货订单物流金额'")
    private BigDecimal purchaseReturnLogisticsAmount;
    /**
     * 采购退货订单优惠金额
     */
    @Column(name = "PURCHASE_RETURN_DISCOUNT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '采购退货订单优惠金额'")
    private BigDecimal purchaseReturnDiscountAmount;
    /**
     * 销售订单金额
     */
    @Column(name = "SALE_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '销售订单金额'")
    private BigDecimal saleAmount;
    /**
     * 销售订单物流金额
     */
    @Column(name = "SALE_LOGISTICS_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '销售订单物流金额'")
    private BigDecimal saleLogisticsAmount;
    /**
     * 销售订单优惠金额
     */
    @Column(name = "SALE_DISCOUNT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '销售订单优惠金额'")
    private BigDecimal saleDiscountAmount;
    /**
     * 销售订单其他费用
     */
    @Column(name = "SALE_OTHER_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '销售订单其他费用'")
    private BigDecimal saleOtherAmount;
    /**
     * 销售退货订单金额
     */
    @Column(name = "SALE_RETURN_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '销售退货订单金额'")
    private BigDecimal saleReturnAmount;
    /**
     * 销售退货订单优惠金额
     */
    @Column(name = "SALE_RETURN_DISCOUNT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '销售退货订单优惠金额'")
    private BigDecimal saleReturnDiscountAmount;
    /**
     * 费用单金额
     */
    @Column(name = "COST_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '费用单金额'")
    private BigDecimal costAmount;
    /**
     * 收入单金额
     */
    @Column(name = "INCOME_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '收入单金额'")
    private BigDecimal incomeAmount;
    /**
     * 收款单金额
     */
    @Column(name = "RECEIPT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '收款单金额'")
    private BigDecimal receiptAmount;
    /**
     * 付款单金额
     */
    @Column(name = "PAYMENT_AMOUNT", columnDefinition = "decimal(19,2) COMMENT '付款单金额'")
    private BigDecimal paymentAmount;
}
